Ext.define('AM.store.Invoices', {
    extend: 'Ext.data.Store',
    model: 'AM.model.Invoice',
    autoLoad: true,
    autoSync: true,
    proxy: {
        type: 'ajax',
        api: {
        	read: 'data/invoice/list.json',
        	update: 'data/invoice/update.json'
        },
        reader: {
            type: 'json',
            root: 'rows',
            successProperty: 'success'
        },
        writer: {
        	type: 'json',
        	writeAllFields: false
        }
    }
});